package com.fstec.ks.master.netty;

import com.sinotn.ks.definition.Computer;
import com.sinotn.ks.definition.MessageSendCallback;

public class DisConnSendCallback implements MessageSendCallback {
	private final Computer computer;
	
	public DisConnSendCallback(Computer computer) {
		this.computer = computer;
	}

	@Override
	public void onSuccess() {
		this.computer.disconnect();
	}

	@Override
	public void onFailure(Throwable e) {
		this.computer.disconnect();
	}

	@Override
	public void onCancel() {
		this.computer.disconnect();
	}
}
